<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%--
  Created by IntelliJ IDEA.
  User: FT
  Date: 2020/9/17
  Time: 12:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.1.js"></script>
    <title>登录</title>
    <style>
        .box{
            width: 400px;
            height: 400px;
            margin: 150px auto;
        }
        label{
            margin-top: 20px;
            display: inline-block;
            width: 60px;
        }
        #checkCode{
            padding: 0;
            margin-buttom: 0;
            border: 1px solid;
        }
    </style>
    <script>
        $(function () {
            $("#checkCode").click(function () {
                $("#checkCode").attr("src","${pageContext.request.contextPath}/img/createCheckCode?nocache="+new Date().getMilliseconds())
            });
        })
    </script>
</head>
<body>
<div class="box">
    <form action="${pageContext.request.contextPath}/login/login" method="post">
        <label>用户名</label>
        <input type="text" name="username" value="admin"><br>
        <c:if test="${error!=null}">
            <span style="color: red">${error}</span>
        </c:if>
        <br>
        <label>密码</label>
        <input type="password" name="password" value="789">
        <a href="/forget.jsp">忘记密码</a>
        <br><br>
        <div>
            <label>验证码</label>
            <input type="text" name="checkCode">
            <img id="checkCode" src="${pageContext.request.contextPath}/img/createCheckCode">
        </div><br>
        <input type="checkbox" name="remeber" value="1">记住我（七天免登陆）<br><br>
        <input type="submit" value="登录">
        <input type="button" onclick="location.href='${pageContext.request.contextPath}/add.jsp'" value="注册"><br><br>
        <a href="/WeChat/towx_login">微信登陆</a>
        <a href="/qq/toQQLogin">QQ登陆</a>
    </form>
</div>
</body>
</html>
